<template>
	<view class="container">
		<view class="info">
			<view class="up" @click="handleAvatarClick">
				<span class="label">头像</span>
				<view class="right-content">
					<image class="img1" :src="userInfo.avatar" mode="aspectFill"></image>
					<image class="img2" src="/static/my-update/收起箭头小.png" mode=""></image>
				</view>
			</view>
			<view class="conter">
				<span class="label">姓名</span>
				<view class="right-content">
					<span class="value">{{ userInfo.name }}</span>

				</view>
			</view>
			<view class="bottoms" @click="handlePhoneClick">
				<span class="label">电话</span>
				<view class="right-content">
					<span class="value">{{ userInfo.phone }}</span>
					<image class="img2" src="/static/my-update/收起箭头小.png" mode=""></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userInfo: {
					avatar: '/static/my-update/头像.png',
					name: '张先生',
					phone: '15023457896'
				}
			}
		},
		methods: {
			// 头像点击事件
			handleAvatarClick() {
				uni.navigateTo({
					url: '/my-item/my-update/my-avatar'
				});
			},

			// 电话点击事件
			handlePhoneClick() {
				uni.navigateTo({
					url: '/my-item/my-update/my-tel'
				});
			}
		}
	}
</script>

<style>
	.container {
		background: linear-gradient(to bottom, #3284fc 50%, #f5f5f5 50%);
		min-height: 40vh;
		max-height: 40vh;
		padding: 10rpx 20rpx;
		box-sizing: border-box;
	}

	.info {
		margin-top: 30rpx;
		background: #ffffff;
		border-radius: 30rpx;
		box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
		padding: 0 20rpx;
	}

	.up,
	.conter,
	.bottoms {
		box-sizing: border-box;
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		position: relative;
	}

	.up {
		padding: 20rpx 10rpx;
	}

	.conter,
	.bottoms {
		box-sizing: border-box;
		border-top: 8rpx solid #f0f2f5;
		padding: 30rpx 10rpx;
	}

	.label {
		font-size: 29rpx;
		font-weight: 600;
		color: #1a1a1a;
		line-height: 1.5;
		letter-spacing: 0.5rpx;
	}

	.right-content {
		display: flex;
		align-items: center;
		gap: 15rpx;
	}

	.value {
		font-size: 28rpx;
		color: #666666;
		font-weight: 400;
		line-height: 1.5;
		letter-spacing: 0.3rpx;
	}

	.img1 {
		border-radius: 50%;
		width: 110rpx;
		height: 110rpx;
		border: 2rpx solid #f0f0f0;
		object-fit: cover;
	}

	.img2 {
		width: 15rpx;
		height: 25rpx;
	}
</style>